<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/11
 * Time: 15:01
 */
namespace app\city\controller;

use think\Controller;

class City extends Controller
{
    //当前城市
    public function index()
    {
          $location = (isset($_GET['location']) && trim($_GET['location'])) ? trim($_GET['location']) : 0;
          $url = file_get_contents('http://apis.map.qq.com/ws/geocoder/v1/?location='.$location.'&key=VFKBZ-TVW34-ZRDUY-XMJSB-JLIHE-BMFNM');
        echo $url;
    }
}